# from flask import Flask
# from flask_sqlalchemy import SQLAlchemy
#
# app = Flask(__name__)

import redis


class Config(object):
    """Base config"""           # 基类，可以继承衍生出不同的开发环境的配置

    DEBUG = False

    ENV = 'development'

    DB_NAME = 'postgres'

    POST = 5432

    HOST = 'localhost'

    USERNAME = 'postgres'

    PASSWORD = 'zjcnb'

    SQLALCHEMY_DATABASE_URI = f'postgresql://{USERNAME}:{PASSWORD}@{HOST}:{POST}/{DB_NAME}'   # postgre

    CLIENT_TZ = ''

    SECRET_KEY = '' # 配置密钥

    SQLALCHEMY_TRACK_MODIFICATIONS = False

    JSON_AS_ASCII = False

    SESSION_TYPE = "redis"  # 存session使用redis

    SESSION_USE_SIGNE = "TRUE"  # 对cookie中session_id进行隐藏处理,加密混淆

    PERMANENT_SESSION_LIFETIME = 10  # 获取的会话在redis上存10S

    SESSION_REDIS = redis.Redis(host="127.0.0.1", port=6379, db=2)  # 连接redis

    LOGGING_CONFIG_PATH = './Settings/logging.yaml'

    LOGGING_PATH = './logs'

    CACHE_MEMCACHED_SERVERS = ''

    CACHE_MEMCACHED_EXPTIME = ''

    ODOO_HOST = ''

    ODOO_PORT = ''

    ODOO_DB = ''


